<?php 
/*
 * File Name : common-code.php
 * Author    : Kundu
 * Date      : 23/04/2011
 * Works     : This page to be included in every category page. 
 */

include 'db-config.php';
include 'clsFetchData.php';

########## Category Name ################
$categoryName ="Golf";
$cityName = "Kelowna";

########## GET LISTINGS FOR THE PARTICULAR CATEGORY #################

$arrayCategoryList = array();
$objFetchData = new clsFetchData();
$arrayCategoryList = $objFetchData->FetchDataToArray($categoryName,$cityName);

#####################################################################
?>
<?php 
if(is_array($arrayCategoryList) && count($arrayCategoryList)>0)
{
	foreach ($arrayCategoryList as $arrData)
	{
?>
<br style="clear:both" /><hr />
<div style="float:left;margin-right:15px"><a href="detail.php?id=<?php echo $arrData['sl_no'];?>"><img src="<?php echo $arrData['business_logo']; ?>" width="75" height="75" border="1" alt="<?php echo $arrData['title']; ?>"  /></a></div>
<div style="float:left;width:225px;margin-right:15px"><div class="titlelink"><a href="listings/detail.php?id=<?php echo $arrData['sl_no'];?>"><?php echo $arrData['street_address']; ?></a></div><?php echo $arrData['phone_number']; ?><br /><a href="<?php echo $arrData['website_url']; ?>" target="_blank">Website</a><br /><a href="listings/detail.php?id=<?php echo $arrData['sl_no']; ?>"><img src="images/go-button.png" width="38" height="19" style="margin-top:10px" border="0" alt="Click Here to view details"  /></a></div>
<div class="textsmall" style="float:left;width:165px;height:70px"><?php echo $arrData['business_summary']; ?></div>
<div class="textmini" style="float:right">ID#<?php echo $arrData['id']; ?></div>
<?php 
	}
}
?>